//
//  ShopCarVC.m
//  BigJoy
//
//  Created by Rowling on 2017/7/10.
//  Copyright © 2017年 Rowling. All rights reserved.
//

#import "ShopCarVC.h"
#import "GoodsCell.h"
#import "ConfirmOrderVC.h"

@interface ShopCarVC ()

@end

@implementation ShopCarVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"购物车";
    [self setUI];
}

-(void)setUI {
    [self.view addSubview:self.XMTableview];
    self.XMTableview.separatorStyle = 1;
    self.XMTableview.height -= 50;
    UIButton * btn = [XMSuperHelper buttonWithTitle:@"编辑" Font:[UIFont systemFontOfSize:12] fontColor:[UIColor colorForHex:@"333333"]];
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:btn];
}

- (IBAction)allSelectButtonClick:(UIButton *)sender {
    sender.selected = !sender.selected;
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 10;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    GoodsCell * cell = [GoodsCell cellWithTalbelView:tableView];
    
    return cell;
}

-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 84;
}
// 结算
- (IBAction)buyButtonClick:(id)sender {
    ConfirmOrderVC * vc = [ConfirmOrderVC new];
    [self.navigationController pushViewController:vc animated:YES];
}


@end
